<?php

	class indexAction extends Action{
		public function index(){
			//自动登录验证
			if(is_object(Session::get("userInfo"))){
				//跳转到用户首页
				$this->redirect("index","focus");
				
			}elseif(Cookie::is_set("email")){ //有cookie则直接cookie验证
				$this->redirect("checklogin","login");
			}else{
				$this->display();
			}
		}
		
		public function linkto(){
			$url = base64_decode($_GET["url"]);
			//echo $url;
			header("Location: ".$url); 
		}
	}
?>